home *** CD-ROM | disk | FTP | other *** search
- Path: gatekeeper.liffe.com!usenet
- From: ralph.mason@liffe.com (Ralph Mason)
- Newsgroups: comp.sys.cbm,comp.os.misc,alt.comp.hardware.homebuilt,comp.sys.apple2,comp.sys.apple2.programmer,comp.sys.atari.8bit
- Subject: Re: 6502 Multitasking OS announce
- Date: Tue, 19 Mar 1996 16:36:39 GMT
- Organization: London International Financial Futures Exchange
- Message-ID: <4imo7b$36m@gatekeeper.liffe.com>
- References: <4i94fs$stj@narses.hrz.tu-chemnitz.de> <holger.948.00030EE6@deep.hb.provi.de> <4ijtbe$7ca@no-names.nerdc.ufl.edu> <4ijuic$iiq@gatekeeper.liffe.com> <4ik00v$9r@fishlab7.fsh.mtu.edu> <4im8k0$gud@gatekeeper.liffe.com> <4iml11$s69@narses.hrz.tu-chemnitz.de>
- Reply-To: ralph.mason@liffe.com
- NNTP-Posting-Host: ralph_pc.liffe.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- fachat@physik.tu-chemnitz.de (Andre Fachat) wrote:
-
- >To share code between processes, you need not put the parameter on the
- >stack. The shell, e.g. is in the ROM. The same program can run several
- >times in different tasks without any problem. This works because
- >the used RAM is mapped to different pages for different tasks.
- >You can also load an executable into some RAM and let two tasks share this
- >RAM. As long as they don't write to it, there's no problem. For writing
- >they use the task specific RAM.
-
- You have sorta missed what I was meaning here. Sure you can map code
- around here and there - but if many processes are going to use the
- same routines the routienes better not use any global data. These
- routine should use the stack for any working data. I guess you use no
- absolute jumps :-)
-
-
- >reentrant routines - well, the kernel is in some respect reentrant.
- >internal kernel routines call other kernel routines via the same
- >interface as other 'user' routines as well. The kernel entry/exit gates
- >detect this and do not change the memory mapping.
- >Devices, that have their own memory mapping and that are called via
- >the DEVCMD interface call kernel routines.
- >But then only some routines are a kind of reentrant, esp. the STREAM routines.
- >They disable Multitasking during their critical sections. The problem
- >with the C64 is, that is doesn't have atomic test&set operations. So all
- >task switches have to be disabled to test a semaphore, or when you enter
- >a critical region.
-
-
- what about a eor ?
-
- you pass in the critial section as the adress and eor that adress with
- say 1
-
- if
-
- wait:
- cmp addr,0
- beq get
- call scheduler yeild function
- jmp wait
- get:
- eor addr,1
- jz wait
-
- ..you should have the critical section here
-
-
- -Ralph Maosn
-
-
-